feat(jobs/challenges): Phase 2 — 7 more poll-based processors#841
Open
raymondjacobson wants to merge 1 commit into
Open
feat(jobs/challenges): Phase 2 — 7 more poll-based processors#841raymondjacobson wants to merge 1 commit into
raymondjacobson wants to merge 1 commit into
Conversation
Adds 7 more challenge processors to api/jobs/challenges/ following the
same poll-based reconciliation pattern from Phase 1. No new infra; all
source tables already exist.
Processors:
c first_weekly_comment one row per (user, ISO-week)
cp comment_pin commenter earns when verified track owner
pins their comment (skips self-pin)
cs cosign verified parent owner saves/reposts a remix;
remixer earns; cap 5 cosigns per parent-owner
per rolling 30 days; currently inactive in catalog
t tastemaker earliest 10 reposters + earliest 10 savers
of each top-10 trending track
w remix_contest_winner winners of verified-host remix contest; max
5 winners per contest, max 5 winner rewards
per host per rolling week
b audio_matching_buyer per USDC purchase; amount = 1 × dollars
s audio_matching_seller same purchase; amount = 5 × dollars; gated
on seller verification
Audio matching reads from v_usdc_purchases (filtered to is_valid = TRUE);
checkpoint by sol_purchases.slot for incremental scanning.
Migration 0204 seeds the catalog rows from challenges.json with ON
CONFLICT DO UPDATE.
Tastemaker top-N bumped to 10 per direction (apps' historical value was
5). Per-track threshold of 10 reposters/savers kept as apps.
All 7 new processors registered in IndexChallengesJob (now 18 total).
Tests: 11 new DB-backed tests covering each processor's happy path and
its main gates (verified/unverified, cap enforcement, invalid purchases).
All passing against test_jobs template DB.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #835 (Phase 1). Adds 7 more challenge processors. No new infra — all source tables already exist.
Confirmations folded in
Stack
```
#834 parity jobs
└─ #835 phase 1 challenges
└─ this PR — phase 2 challenges
```
Test plan
11 DB-backed tests in addition to the 12 from Phase 1:
Next
PR B (signals endpoint + 5 Phase 3 processors) follows.
🤖 Generated with Claude Code